Skip to content

lib/pathsToImportedAttrs: discard string context in the names to prevent flake check error#215

Merged
bors[bot] merged 1 commit intodivnix:corefrom
Pacman99:string-context-fix
Mar 26, 2021
Merged

lib/pathsToImportedAttrs: discard string context in the names to prevent flake check error#215
bors[bot] merged 1 commit intodivnix:corefrom
Pacman99:string-context-fix

Conversation

@Pacman99
Copy link
Member

@Pacman99 Pacman99 commented Mar 26, 2021

So I learned about this myself while working on it. Nix has a thing called string context, where strings refer to various store paths that they used to contain. This is normally a good thing to guarantee purity, but flake outputs cannot contain store paths. So when pathsToImportedAttrs is passed a list of store paths, and is then used for a flake output, we get a very confusing error that the string refers to a store path - even though it doesn't look like it does!
I think its good to review this as a separate Pr, since it requires calling an unsafe nix builtin.

Copy link
Collaborator

@nrdxp nrdxp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 26, 2021

Build succeeded:

@bors bors bot merged commit 3c772df into divnix:core Mar 26, 2021
@Pacman99 Pacman99 deleted the string-context-fix branch April 1, 2021 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants